package com.dhecp.core.utils.qywx;

/**
 * @ClassName 企业微信URL常量
 * @Description TODO
 * @Author alula
 * @Date 2022-03-02 11:38
 */
public class QyWxApiUrls {

    // 获取access_token的接口地址（GET） 限2000（次/天）get请求
    public final static String ACCESS_TOKEN_URL = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=APPID&corpsecret=APPSECRET";
    //获取企业的jsapi_ticket的接口地址（GET） 限2000（次/天）get请求
    public static final String JSAPI_TICKET_URL = "https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket?access_token=ACCESS_TOKEN";
    //获取应用的jsapi_ticket接口地址
    public static final String JSAPI_TICKET_URL_AGENTCONFIG = "https://qyapi.weixin.qq.com/cgi-bin/ticket/get?access_token=ACCESS_TOKEN&type=agent_config";
    //创建微信用户
    public static final String USER_CREATE_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/create?access_token=ACCESS_TOKEN";
    //修改微信用户
    public static final String USER_UPDATE_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/update?access_token=ACCESS_TOKEN";
    //删除微信用户
    public static final String USER_DELETE_URL = " https://qyapi.weixin.qq.com/cgi-bin/user/delete?access_token=ACCESS_TOKEN&userid=USERID";
    // 获取部门列表
    public static final String DEPT_GET_URL = "https://qyapi.weixin.qq.com/cgi-bin/department/list?access_token=ACCESS_TOKEN";
    /* 获取部门成员		get请求
     * https://open.work.weixin.qq.com/api/doc/90000/90135/90196
     * access_token		必填		调用接口凭证
     * department_id	必填		获取的部门id
     * fetch_child		必填		是否递归获取子部门下面的成员：1-递归获取，0-只获取本部门
     */
    public static final String USER_GET_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID&fetch_child=FETCH_CHILD";
    // 获取访问用户身份（GET）
    public static final String USERINFO_GET_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=ACCESS_TOKEN&code=CODE";
    /* 获取打卡数据 	post请求
     * access_token 			必填	调用接口凭证。企业必须使用打卡应用的Secret获取access_token
     * opencheckindatatype 	必填	打卡类型。1：上下班打卡；2：外出打卡；3：全部打卡
     * starttime 			必填	获取打卡记录的开始时间。Unix时间戳
     * endtime 				必填	获取打卡记录的结束时间。Unix时间戳
     * useridlist 			必填 	需要获取打卡记录的用户列表
     */
    public static final String CHECKIN_GET_URL = "https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckindata?access_token=ACCESS_TOKEN";
    // 获取发送应用消息的接口地址（post）
    public static final String MESSAGE_SEND_URL = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=ACCESS_TOKEN";
    //创建日历
    public static final String CALENDAR_CREATE_URL = "https://qyapi.weixin.qq.com/cgi-bin/oa/calendar/add?access_token=ACCESS_TOKEN";
    //更新日历
    public static final String CALENDAR_UPDATE_URL = "https://qyapi.weixin.qq.com/cgi-bin/oa/calendar/update?access_token=ACCESS_TOKEN";
    //删除日历
    public static final String CALENDAR_DELETE_URL = "https://qyapi.weixin.qq.com/cgi-bin/oa/calendar/del?access_token=ACCESS_TOKEN";
    //创建日程
    public static final String SCHEDULE_CREATE_URL = "https://qyapi.weixin.qq.com/cgi-bin/oa/schedule/add?access_token=ACCESS_TOKEN";
    //更新日程
    public static final String SCHEDULE_UPDATE_URL = "https://qyapi.weixin.qq.com/cgi-bin/oa/schedule/update?access_token=ACCESS_TOKEN";
    //取消（删除）日程
    public static final String SCHEDULE_DELETE_URL = "https://qyapi.weixin.qq.com/cgi-bin/oa/schedule/del?access_token=ACCESS_TOKEN";
    //oauth2授权地址
    public static final String OAUTH2_AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base&state=#wechat_redirect";
}
